package com.android.smsmessing.adapter;

import com.android.smsmessing.R;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.EditText;
import android.widget.ImageButton;

public class HeaderAdapter extends BaseAdapter {
	private LayoutInflater mInflater = null;
	
	public HeaderAdapter(Context c) {
		mInflater = (LayoutInflater) c
		.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
	}
	
	private static class ViewHolder {
		EditText txtSearch;
		ImageButton btnSearch;
	}
	
	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public Object getItem(int position) {
		// TODO Auto-generated method stub
		return position;
	}

	@Override
	public long getItemId(int position) {
		// TODO Auto-generated method stub
		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		ViewHolder holder = null;
		if(convertView == null){
			holder = new ViewHolder();
			convertView = mInflater.inflate(R.layout.list_people_head, null);
			holder.txtSearch = (EditText) convertView
					.findViewById(R.id.txtSearch);
			holder.btnSearch = (ImageButton) convertView
					.findViewById(R.id.btnSearch);
		}else {
			holder = (ViewHolder) convertView.getTag();
		}
		convertView.setTag(holder);
		// TODO Auto-generated method stub
		return convertView;
	}

}
